package
{
	import flash.display.Sprite;
	import flash.filters.BevelFilter;

	public class Box extends Sprite
	{
		private var _color:uint;
		public static const SIZE:uint = 30;
		
		public function Box(color:uint)
		{
			this._color = color;
			this.dibujar();
			this.agregarEfectos();
		}
		
		private function dibujar():void
		{
			this.graphics.clear(); 
			this.graphics.lineStyle(1,0x006699,1,false,"none");
			this.graphics.beginFill(this._color);
			this.graphics.drawRect(1,1,SIZE - 2, SIZE - 2);
			this.graphics.endFill();
		}
		
		private function agregarEfectos():void
		{
			var bf:BevelFilter = new BevelFilter(4, 45, 0xffffff, 0.4, 0x000000, 0.5, 2, 2, 10, 10);
			this.filters = [bf];
		}
	}
}